Smart Energy Management for Hybrid Systems: A Genetic Algorithm in Response to Market Volatility

Original scientific paper

Journal of Sustainable Development of Energy, Water and Environment Systems
Volume 13, Issue 2, June 2025, 1130536
DOI: https://doi.org/10.13044/j.sdewes.d13.0536
Dácil Díaz-Bello1, Carlos Vargas-Salgado2 , Jesús Águila-León3, David Alfonso-Solar1
1 Universitat Politècnica de València, Valencia, Spain
2 Universitat Politècnica de Valéncia, Valencia, Spain
3 Universidad de Guadalajara, Guadalajara, Mexico

Abstract

Energy prices have fluctuated significantly due to global events like the COVID-19 pandemic and geopolitical conflicts, with future projections suggesting continued volatility. This study explores how these pricing variations affect the costs and energy consumption of a smart energy management hybrid poly-generation system. For this purpose, a genetic algorithm is applied to optimize energy management under different market conditions (COVID-19, the war, the Business as Usual situation, and future price trends for 2030). The methodology also includes a sensitivity analysis, comparing Stable vs. Critical cases in Spain. The results demonstrate a 23% reduction in operational costs and an 18% decrease in energy importation under Critical conditions, while demand shifting during peak periods reduced peak electricity costs by up to 59%. These findings highlight the importance of adaptive, intelligent energy management systems for reducing costs and enhancing sustainability in volatile market conditions.

Keywords: Sensitivity analysis; Genetic Bio-inspired algorithms; Renewable integration; Energy management; Electricity market scenarios.

Creative Commons License
Views (in 2025): 1615 | Downloads (in 2025): 745
Total views: 1615 | Total downloads: 745
Introduction

Efficient energy management represents a major challenge, characterized by the complexity derived from multiple factors, including the variability of natural resources, diversification of energy sources, fluctuating demand, and the increasing integration of renewable technologies and Electric Vehicles (EVs) as highlighted in [1]. Similarly, [2] discusses how the transition to sustainable energy systems is compounded by similar challenges, with an emphasis on the integration of renewable energy sources and the need for advanced energy management strategies. In particular, the transition to a low-carbon energy system, as observed in the Nordic-Baltic region, exemplifies the complex interplay between different energy sources, demand variability, and geopolitical contexts [3]. Consequently, the need for Microgrids (MG) and smart grids has become imperative as the power grid and the electricity market undergo a gradual transition from a centralized to a more distributed model to meet the current challenges [4]. Despite the advances made with the implementation of MG, ranging from coordinated control strategies [5] to improvements in modelling [6], energy efficiency [7] and resource and demand management [8], significant opportunities remain for innovation in terms of system optimization, both in energy management and in equipment control, planning, and facility design [9].

In the field of strategies to improve these systems, methods have been investigated to optimize the planning of the combination of generation sources, with a significant emphasis on the search for scenarios of zero greenhouse gas emissions. For instance, a study on Benin's energy sector [10] demonstrates how integrating renewable energy sources, such as solar, wind, and hydropower, can significantly reduce CO2 emissions while achieving higher renewable energy penetration targets. Similarly, the evolution of power generation mixes globally, analyzed through system dynamics models, reveals the potential of clean energy adoption in meeting carbon neutrality goals [11]. Furthermore, the case of Ghana illustrates that increasing renewable energy penetration in the electricity sector can lead to substantial greenhouse gas emissions reductions, aligning with climate change mitigation objectives [12]. These studies thoroughly analyse the impact of incorporating renewable energies into the energy matrix, which is important for guiding policies and implementing strategies to promote the transition to more sustainable energy systems more resilient to climate change. Research such as [13] shows the economic viability of using renewable technologies when considering the optimal combination of energy generation and storage systems, such as pumped hydroelectric storage, lithium batteries, and EV batteries. Meanwhile, from an energy perspective, [14] emphasizes that energy savings play a fundamental role in enhancing hybrid renewable systems, with energy efficiency serving as a primary objective. This involves optimizing energy use to reduce waste and maximize system performance. Additionally, the importance of implementing energy efficiency measures in residential buildings has been extensively underscored, particularly in Mediterranean regions where climatic conditions, such as hot summers and mild winters, significantly influence energy consumption patterns [15]. These studies highlight the need for energy optimization packages tailored to specific climates to maximize efficiency and reduce costs in the residential sector.

The current literature reflects significant interest in applying computational intelligence technologies to address MGs' operation, optimization, and energy control challenges. For instance, Artificial Neural Networks (ANN) combined with gravitational search algorithms improve load and price forecasting accuracy [16], hybrid neuro-evolutionary methods enhance wind power output prediction [17], and ANNs optimize catalytic processes for energy transitions [18]. Bio-inspired algorithms, based on processes and patterns observed in nature, have emerged as effective metaheuristics in optimization and prediction in a variety of contexts. Researchers have explored their application to improve the performance of renewable technologies compared to traditional approaches, as in the case of Maximum Power Point Tracking controllers using the Grey Wolf Optimizer (GWO) with lower curling effect, faster settling time for each irradiation level, and improvement of the system response [19]. Furthermore, comparative analyses have been performed between different optimization methods based on nature-inspired algorithms, such as Particle Swarm Optimization (PSO) and GWO, in the modelling of lithium-ion batteries [20], revealing remarkable enhancements in the model through the terminal voltage compared to the non-optimized model, with superior performance through the GWO. Also, [21] compares the performance of three bio-inspired algorithms, GWO, PSO, and Genetic Algorithm (GA) in the tuning of DC-DC Boost Converter PID Controller, with good overall performance after evaluating the system response under different input voltage and load changes. Other studies have explored optimal energy management in smart microgrids, particularly in scenarios involving high penetration of EVs and distributed renewable sources, utilizing hybrid approaches such as GAs and analytic hierarchy process [22].

On the other hand, proper energy management is necessary in the progress towards the next stage of the energy transition. In this sense, it will be necessary that the household sector adapts flexibly to align energy consumption with the highly variable production patterns inherent to renewable energies [23]. Bio-inspired algorithms emerge as dynamic tools capable of addressing the complexity of energy systems. Along these lines, several researchers have explored their application in Hybrid Renewable Energy Systems (HRES) networks, developing methodologies that integrate ANNs optimization to improve system reliability and efficiency through PSO [24]. In turn, other studies have used these algorithms to estimate the optimal amount of biomass required in gasification plants to produce the necessary synthesis gas and cover the energy demand [25]. Even the efficiency of these approaches has been compared with [26] after implementing an evolutionary game-theoretic approach for an energy management model, with better results for [27].

Despite the progress made, there are still unresolved challenges in this field. For instance, most current approaches focus on optimizing the management of generated energy, neglecting the consideration of domestic demand and other key loads such as EVs, without establishing a bidirectional adaptation. The growing role of EVs in HRES must be considered, especially after policy interventions in the European Union aimed at boosting the transition to electric technology [28].

Therefore, an issue of utmost importance today in the scientific community is to achieve energy management capable of adapting to the most uncertain factors present in HRESs: natural resources, user demand, and the electricity market. Therefore, this paper develops an innovative strategy to address complex problems in energy management, proposing the hypothesis of integrating the GA to determine optimal strategies for both electricity demand (household load and EV charging) and energy use, minimizing grid costs. For this purpose, a case study of a household in Valencia, Spain, is selected to validate the proposed methodology, using real data to increase the applicability and validity of the results. The household consists of a grid connection, a demand, and a PV installation to which an ESS and an EV are added to evaluate the proposed hypothesis's feasibility further. The proposed model is evaluated through a sensitivity analysis under various electricity market cost scenarios, including geopolitical conflicts, pandemic conditions, the Business as Usual (BAU) status, and future projections. Also, two cases, referred to as Stable and Critical, are considered to rigorously assess the model's robustness. Likewise, recent works also address the impact of external factors, such as global events like the COVID-19 pandemic, on household energy consumption patterns, demonstrating that lockdowns led to significant increases in energy use at home due to lifestyle changes [29]. Such studies highlight the need for adaptive energy management models that can respond to shifts in demand caused by extraordinary circumstances.

The implementation of the proposed model shows significant improvements in the operational efficiency of the MG, especially in the utilization of solar energy and batteries during Stable cases, as well as in the adaptability of the algorithm in Critical cases. This points towards smarter energy management that not only reduces costs but also improves the stability of the energy supply by dynamically adapting to variable situations and reducing the carbon footprint. Hence, the main objective of this work is to develop and validate an approach based on GAs through a sensitivity analysis of electricity market costs, which addresses these shortcomings to improve the operational efficiency of MG and advance the transition towards a cleaner and more sustainable energy system. The proposed work is organized as follows: section 2 presents the methodology with the system under study, and a description of the scenarios and cases considered, section 3 provides the results, section 4 refers to the discussion of this application, and section 5 outlines the main conclusions and future work.

Methods

The following section provides a detailed overview of the methodology used in this study. Different software programs have been employed to conduct the research: FusionSolar has been used to collect experimental data from the real installation, System Operator Information System (ESIOS) has been employed for obtaining electricity market prices, Iberian Energy Market Operator - Portuguese Hub (OMIP) has been used for future price projections, while MATLAB has been employed to model the system under study and implement the GA.

In this section, the characteristics of the MG are presented in detail, the various systems analysed, and the process of obtaining the experimental data. The configuration and adjustment of the GA parameters are also described. Finally, the scenarios and cases simulated, and the evaluation criteria of the proposed systems are explained, including analysis of power flows, costs, CO2eq emissions to the atmosphere, and computation time. It is worth mentioning that the case studies are based on a household consisting of a grid connection, a demand, and a PV installation to which an ESS and an EV are added to evaluate the proposed model's potential further.

Figure 1 shows the workflow corresponding to the proposed hypothesis, which starts with the first data input step (stage 1), followed by the execution of the genetic algorithm (stage 2), and concludes with the model evaluation stage (stage 3).

Methodology for the proposed optimized energy manager model

The inputs and outputs of the model are explained as follows.

System under study

The MG consists of a solar PV installation, domestic demand, an ESS, an EV, and a grid connection that allows sending surpluses and receiving when it is not possible to meet the demand. Figure 2 shows the energy flow directions in the MG.

MG under study

In the current installation, the loads (household demand and EV) are supplied in the following priority order:

  1. Demand is met using the energy generated by the PV installation.

  2. If the energy produced by the PV installation is insufficient to cover both demands, the ESS is called upon.

  3. If both the PV installation and the ESS fail to meet the demands, energy is imported from the grid.

  4. Situations involving surplus energy generated by the PV panels are first directed to the ESS. The surplus is injected into the grid for sale if the ESS is fully charged.

This process ensures a continuous balance in energy supply and demand.

Photovoltaic model

Data obtained from a house located in Valencia, Spain, was employed to model the PV installation. This residence has a PV installation with a power of 4.2 kWp, consisting of two strings of six solar panels of 350 Wp each, arranged in series, with an MPPT assigned to each string. The solar panels are mounted with a slope of 20.5° and aN azimuth of 202°. The solar inverter connected to these panels has a capacity of 3.3 kW and has two MPPT inputs to manage power production optimally.

Residential demand model

The consumption data have been collected from the same residence located in Valencia, with TP-Link Tapo P100 for all devices, except the oven and the air conditioner with TAXNELE TVPS1-63T. A clear distinction between loads classified as 'variable' and 'fixed' has been made. Variable loads comprise those that are considered to be Demand Response (DR), that is, those flexible loads which consumption patterns can be modified without compromising the user's comfort. On the other hand, fixed loads include those that have been determined as not susceptible to modification, since altering them would directly impact the user's daily routine. This focus on load differentiation allows for a more specific understanding of consumption patterns and their potential for implementing effective energy management strategies. Table 1 presents in detail the classification of the equipment used in the installation and their respective installed power.

Power of the considered loads

Measured average power in one hour [kW]

Fix load

Oil heater

1.55

Radiation heater

1.19

Television

0.15

Fridge

0.08

Microwave

1.21

Oven

2.39

Variable load

Electric water heater

1.50

Dishwasher

0.67

Washing machine

0.90

AC

2.80

Total

12.44

Contracted power

4.50

Energy storage system model

The ESS employed in this study is based on an installation located at the Renewable Energy Laboratory of the Polytechnic University of Valencia (LabDER-UPV). This system is composed of 24 lead-acid batteries, with a total energy storage capacity of 10.32 kWh. Each of these batteries has a nominal voltage of 2 V. MATLAB software was used to model the ESS using equations eq.(1), eq. (2) and eq. (3). This approach allowed an accurate representation of the ESS behaviour in the context of the study, thus ensuring the results' reliability and accuracy.

W h bat_max = n bat * V bat * C W h bat = E discharge * η d E charge * η c SoC= Wh bat Wh bat_max

Where Whbat_max is the maximum energy capacity of the battery, nbat is the number of batteries, Vbat is the batteries voltage, C is the batteries capacity, Whbat is the battery instantaneous energy, Edischarge is the battery discharge energy, Echarge is the battery charge energy, yd is the discharging battery efficiency, ηc is the charging battery efficiency and SoC is the battery State of Discharge.

Electric vehicle model

An EV has been integrated into the MG to further evaluate the feasibility of the strategy proposed as a hypothesis. For the EV simulation, the vehicle used in [30], the Nissan Leaf, which is a leading choice among EVs, especially in the European market where it has secured its position as one of the best sellers, has been taken as a reference. Since its introduction in 2010, global sales have exceeded 300,000 units, with 68,000 units sold specifically in Europe [31]. The EV battery pack architecture comprises two battery cells connected in series, which in turn are connected in parallel with two other cells, forming a battery module. A total of 48 battery modules are connected in series to create the battery pack. Each battery cell has a nominal capacity of 32.5 Ah, with a nominal voltage of 3.75 V and a maximum voltage of up to 4.2 V. Considering the number and configuration of the battery modules, the total rated voltage and capacity are 360 V and 24 kWh, respectively. The complete battery pack is divided into three sections. One section contains 24 modules positioned centrally within the pack, while the other two sections hold 12 modules each connected in series, located on either side of the central section.

Eq. (1), eq. (2), and eq. (3) were employed to model the EV battery charging system. The EV discharge profile was developed based on the EV battery discharge behaviour analysis presented in [26] and the driving cycles described in [27]. Two distinct driving cycles, as illustrated in Figure 3, were selected for analysis. The first driving cycle, shown in Figure 3 (a), represents a weekend case characterized by recreational use. This cycle involves an extended journey of 46,210.07 meters, typical of non-working days. In contrast, the second driving cycle, depicted in Figure 3 (b), corresponds to a weekday case and represents a commuting journey. This cycle involves a shorter and more routine distance of 14,085.53 meters, reflecting typical work-related travel patterns on working days. This approach provides more variability to the scenarios studied.

Implemented driving cycles:(a) 'MODEM Hyzem motorway_total, and (b) LDV_PVU commercial cars road_total

Grid model

Currently, the Voluntary Price for the Small Consumer (PVPC) in Spain is structured into three time periods: peak, flat, and valley, which directly influence the cost of electricity throughout the day. This system was introduced in June 2021 to encourage more efficient energy use by offering lower rates during valley hours and higher rates during peak demand periods. The PVPC is directly linked to wholesale market prices and incorporates all regulatory updates, including adjustments in access tariffs and tolls approved by the Spanish regulatory authority. Consequently, the cost data employed inherently reflect both the major regulatory shift in 2021 and the minor adjustments implemented annually. This methodological approach ensures that the analysis is consistent with the actual market dynamics and regulatory framework over the study period.

Before 2021, the PVPC tariff followed a simpler structure with two time periods: peak and valley. The valley period generally covered nights and weekends when demand was lower, while the peak period included daytime hours when electricity demand was higher. This change to the three-period system was implemented to better reflect the fluctuating costs of electricity production. It is important to take this distinction into account for the different simulated scenarios, given the years in which each tariff structure was applied. The hours corresponding to each tariff period are shown in Table 2. The abbreviation DHA in the referenced table corresponds to Two-period Time Discrimination, while TD refers to the Three-period Domestic Access Tariff. Both abbreviations are derived from their original terms in Spanish.

Electricity market periods for tariff 2.0TD and 2.0DHA

Period

Days

Time range

Tariff 2.0TD (from June 2021 onwards)

Peak

Monday to Friday

10:00 - 14:00, 18:00 - 22:00

Flat

Monday to Friday

08:00 - 10:00, 14:00 - 18:00, 22:00 - 00:00

Valley

Monday to Friday

00:00 - 08:00

Valley

Saturday, Sunday, and Holidays

All day

Tariff 2.0DHA (before June 2021)

Peak

Monday to Friday

12:00 - 22:00

Valley

Monday to Friday

00:00 - 12:00, 22:00 - 00:00

Valley

Saturday, Sunday, and Holidays

All day

Optimization approach

To improve the current MG presented, the GA is introduced to adjust both domestic and EV demand, and modify the supply source for both, by minimizing the costs associated with the power grid for a relevant week, thus improving the energy management of the MG. To do so, the GA follows a sequence of steps that includes initialization of the population, evaluation of the fitness level of each solution, selection of individuals, breeding of the selected ones, and creation of a new generation. These steps are repeated iteratively until the optimal solution or a previously established termination criterion is reached. It is important to carefully adjust its parameters and operators to ensure the effectiveness of the GA in different contexts and microgrid configurations. Table 3 details the specific parameter settings employed in the GA to address what is proposed in this research.

Parametrization of GA

Parameter

Function

Value

Objective function

fun

Minimize PVPC costs.

Number of variables

nvar

Depends on the operating time of the load and EV.

lb

ON switch time.

ub

OFF switch time.

IntCon

-

1:nvar

Population size

-

nvar

Mutation rate

mutation uniform

0.3

Crossover rate

crossoverlaplace

0.7

The mutation and crossover rate values have been determined after a series of tests covering a complete range of values, from the minimum to the maximum (0 to 1) with steps of 0.1. These tests showed that a mutation rate of 0.3 provides the most effective results in exploring the search space associated with the optimization problem. Figure 1 shows the optimization process developed.

Sensitivity scenarios

This section provides a comprehensive overview of the energy demand and climatic conditions considered in this study, as well as an analysis of the various electricity cost scenarios derived from market fluctuations.

Cases description.

This study considered two simulated cases regarding total demand consumption and resource availability: Stable (sunny, characterized by higher availability of solar energy resources and lower energy demand) and Critical (cloudy, associated with lower availability of solar energy resources and higher energy demand). Regarding energy consumption, the daily average for the Stable case is 127 kWh, whereas for the Critical case, it is 164 kWh.

Concerning the classification of solar generation data into "sunny" and "cloudy" conditions was established through an analysis of total energy generation values over a specified week. The data indicate that the total solar generation for sunny days ranged from 203.28 kWh to 264.66 kWh, while cloudy days exhibited generation values between 72.21 kWh and 201.80 kWh. Notably, the highest generation values were consistently associated with sunny conditions, whereas the cloudy conditions demonstrated significantly lower output levels.

Electricity cost scenarios description.

By analysing diverse scenarios, this study aims to observe the potential implications of fluctuating electricity costs on the operation and optimization of hybrid energy systems. Particularly, four relevant and different electricity cost scenarios for the Spanish market are considered. These scenarios were defined as follows:

  • War: This scenario reflects the period during which the impact of geopolitical conflicts significantly affected electricity costs in Spain (that is, the war between Russia and Ukraine). During this time, costs surged to unprecedented levels, highlighting the vulnerability of energy markets to external shocks.

  • COVID: This scenario represents the period in which the COVID-19 pandemic had a profound impact on electricity costs in Spain. In contrast to the War scenario, costs decreased substantially, reaching notably low levels.

  • BAU: This scenario represents a week of September 2024, during which a pronounced reduction in electricity costs is observed, particularly during the midday hours when solar generation peaks. This trend reflects the growing influence of renewable energy sources on market prices.

  • OMIP 2030: This scenario incorporates future projections based on the OMIP trends for Spain in 2030. It reflects anticipated market dynamics, including evolving energy supply and demand patterns, policy changes, and advancements in technology.

Since the COVID scenario occurred before 2021, the corresponding electricity tariff is 2.0DHA, while the remaining scenarios correspond to the 2.0TD tariff. The graphs representing electricity costs are presented in Figure 4. The data for the first three scenarios analysed in the sensitivity assessment come from the ESIOS platform of the electricity grid operator in Spain [32]. In contrast, the cost projections for the OMIP 2030 scenario were obtained from the Spanish market operator [33].

Comparison of electricity costs across different scenarios

Carbo dioxide emissions calculation

Regarding the calculation of reduced CO2 emissions, the value provided by [34] of 0.10 [tCO2eq./MWh] in the national system has been used to assess the impact of the proposed hypothesis.

Results

This section begins by showing the costs obtained, as this is the main objective of the study and the sensitivity analysis. Then, the results related to energy consumption and CO2 emissions reduction are presented, to conclude with an analysis of the computation time of the optimization processes.

Sensitivity analysis by electricity costs

This section presents the electricity costs by case and scenario. The costs are shown for the Base condition (before the implementation of the optimization algorithm) and after applying the optimization algorithm, referred to as the Optimized condition.

To assess the effectiveness of the model optimization and its performance under different cases for each scenario, Table 4 presents a comparative analysis of electricity costs across various scenarios, including War, COVID, BAU, and OMIP 2030. The costs are provided for both Critical and Stable cases, displaying the baseline and optimized values. This comparison highlights the differences in electricity costs between each scenario and the impact of the optimization process on cost reduction.

Electricity costs under different scenarios and optimization cases

Critical

Stable

Base

Optimized

Cost reduction

Base

Optimized

Cost reduction

War

58.93 €

50.49 €

-8.44 €

-14%

30.40 €

22.54 €

-7.86 €

-26%

COVID

7.17 €

4.33 €

-2.84 €

-40%

3.92 €

2.19 €

-1.73 €

-44%

BAU

13.66 €

11.09 €

-2.57 €

-19%

8.15 €

5.79 €

-2.36 €

-29%

OMIP 2030

6.33 €

5.27 €

-1.07 €

-17%

3.46 €

2.82 €

-0.64 €

-19%

As observed in the cost savings, in both cases (Critical and Stable), there are reductions in electricity costs after implementing the optimization model for each proposed electricity cost scenario. A detailed examination shows that the scenario with the greatest impact from optimization occurs under the Critical case (with reduced availability of renewable energy), which will be the primary focus of the discussion in the study.

The percentage values shown in Table 4 represent the reduction in electricity costs by scenario and cases after implementing the optimization model. These percentages highlight the cost savings achieved under each scenario, offering insight into the model's performance across varying cases.

To study in greater detail how the electricity cost curves affect consumption costs by period, the corresponding calculations have been broken down and detailed in Table 5 for Critical and Stable cases. In this way, it is possible to observe the distribution of costs in each of the tariff periods: peak, flat, and valley. After the implementation of the model, it is possible to visualize how the model shifts electricity consumption costs (therefore, demand and EV, and electricity usage) towards the lowest cost periods. This analysis is carried out for each of the scenarios considered, making it possible to evaluate the distribution of costs according to the different weather and tariffs.

Weekly avoided costs by period for different scenarios and cases: base vs. optimized costs

Period

Base

Optimized

Weekly avoided cost by period

Weekly avoided cost by period

Critical case

War

Peak

24.74 €

11.78 €

-12.96 €

-52%

Flat

5.17 €

7.67 €

2.50 €

48%

Valley

29.02 €

31.05 €

2.02 €

7%

COVID

Peak

5.97 €

2.43 €

-3.55 €

-59%

-

-

-

-

-

Valley

1.19 €

1.90 €

0.70 €

59%

BAU

Peak

7.04 €

4.32 €

-2.72 €

-39%

Flat

1.01 €

1.72 €

0.71 €

70%

Valley

5.60 €

5.05 €

-0.55 €

-10%

OMIP 2030

Peak

3.37 €

1.73 €

-1.65 €

(-49%

Flat

0.54 €

0.68 €

0.14 €

27%

Valley

2.42 €

2.71 €

0.28 €

12%

Stable case

War

Peak

15.43 €

10.63 €

-4.80 €

31%

Flat

2.32 €

3.65 €

1.32 €

57%

Valley

12.65 €

8.26 €

-4.38 €

-35%

COVID

Peak

3.16 €

1.27 €

-1.89 €

-60%

-

-

-

-

Valley

0.76 €

0.92 €

0.16 €

21%

BAU

Peak

4.20 €

2.39 €

-1.81 €

-43%

Flat

0.68 €

1.16 €

0.48 €

71%

Valley

3.28 €

2.24 €

-1.03 €

-32%

OMIP 2030

Peak

2.00 €

1.17 €

-0.82 €

-41%

Flat

0.33 €

0.57 €

0.25 €

76%

Valley

1.14 €

1.07 €

-0.07 €

-6%

Sensitivity analysis by energy distribution

This section focuses on the analysis of energy consumption patterns across different cases and scenarios. The objective is to highlight the variations in electricity imports, as these are intricately linked to consumption behaviours under different circumstances.

Table 6 presents a detailed breakdown of energy import for each scenario, including War, COVID, BAU, and OMIP 2030. This table contrasts the baseline consumption with the optimized consumption achieved through the implementation of the optimization algorithm. Comparing the energy imports before and after optimization shows how these patterns evolve in response to changing case conditions.

Energy imports under different scenarios and optimization cases, in [kWh]

Critical

Stable

Base

Optimized

Cost reduction

Base

Optimized

Cost reduction

War

1218.18

1063.16

155.02

13%

643.60

477.65

165.96

26%

COVID

1218.18

1049.44

168.74

14%

643.60

465.46

178.14

28%

BAU

1218.18

1037.38

180.80

15%

643.60

469.66

173.94

27%

OMIP 2030

1218.18

1039.16

179.02

15%

643.60

517.70

125.90

20%

In the case of Table 6, it is important to note that, unlike Table 4, the values for imported energy in the baseline model (without optimization) remain constant across all scenarios. This uniformity arises because the consumption pattern is identical in the baseline model for all scenarios. The differences in imported energy values only manifest after the application of the optimization model. Conversely, in the table related to costs, varying values were observed in the baseline model. This variability is attributable to the specific cost curve scenario being analysed, where each scenario presents a distinct cost structure. Thus, while the energy import values are consistent in the baseline model, the cost values fluctuate based on the underlying scenario, showing the model's ability to reveal economic insights as a function of the operating context.

Following the implementation of the optimization algorithm, a marked shift in electricity imports can be observed across all scenarios. This shift is particularly evident in the peak periods from Table 7, where the optimization model effectively redistributes energy consumption, thereby reducing the reliance on imported electricity.

Weekly energy imports by period for different scenarios and cases: base vs. optimized costs, in [kWh]

Period

Base

optimized

Weekly avoided cost Week by period

weekly avoided cost by period

Critical case

War

Peak

481.47

224.83

-256.64

-53%

Flat

113.70

159.88

46.18

41%

Valley

623.01

678.45

55.44

9%

COVID

Peak

817.73

335.95

-481.78

-59%

-

-

-

-

-

Valley

400.45

713.49

313.04

78%

BAU

Peak

481.47

281.85

-199.62

-41%

Flat

113.70

161.44

47.75

42%

Valley

623.01

594.08

-28.93

-5%

OMIP 2030

Peak

481.47

24.85

-239.62

-50%

Flat

113.70

142.73

29.03

26%

Valley

623.01

654.58

31.57

5%

Stable case

War

Peak

290.50

204.14

-86.36

-30%

Flat

59.29

83.93

24.64

42%

Valley

293.81

189.58

-104.23

-35%

COVID

Peak

438.13

171.28

-266.86

-61%

-

-

-

-

-

Valley

205.47

294.18

88.71

43%

BAU

Peak

290.50

149.83

-140.67

-48%

Flat

59.29

101.59

42.30

71%

Valley

293.81

218.23

-75.58

-26%

OMIP 2030

Peak

290.50

172.90

-117.60

-40%

Flat

59.29

109.39

50.10

84%

Valley

293.81

235.42

-58.39

-20%

Sensitivity analysis by carbon dioxide emissions saved

This section presents an analysis of the CO2 emissions saved in terms of metric kilograms of CO2 equivalent (kgCO2eq) under various scenarios and cases. Table 8 summarizes the reductions in CO2 emissions achieved through the implementation of the optimization model for different scenarios, including War, COVID, BAU, and OMIP 2030. The negative values in the table indicate a decrease in emissions relative to the baseline conditions, highlighting the effectiveness of the optimization process in achieving lower carbon footprints.

Comparative of CO2 emissions saved in [kgCO2eq]

Critical

Stable

War

15.50

16.60

COVID

16.87

17.81

BAU

18.08

17.39

OMIP 2030

17.90

12.59

Given that this analysis focuses on weekly emissions reductions, the values are presented in [kgCO2eq] rather than the more commonly used metric tons of CO2 equivalent [tCO2eq]. This choice reflects the smaller scale of weekly reductions, providing a more precise representation of the impact of the optimization algorithm over shorter timeframes.

Computational time performance

The computational times required for each optimization process under different cases and scenarios are presented in Table 9. These times offer insight into the performance of the optimization algorithm. As observed, the computational times vary across scenarios, with the War and BAU scenarios under Critical cases showing the highest computational demands, at 60 and 62 minutes, respectively. In contrast, the Stable cases consistently required less computational time, with all scenarios except BAU showing times around 23 minutes. This variability in computational effort is likely related to the increased complexity of managing electricity demand under Critical cases, where the availability of renewable energy is lower, and the optimization process must account for greater constraints.

Computational times for optimization under different cases and scenarios, in [min]

Critical

Stable

War

60

23

COVID

44

23

BAU

62

16

OMIP 2030

38

23

Discussion

The implementation of the optimization algorithm in this study yielded substantial cost reductions across all scenarios. In the Stable case, the energy system operates with fewer constraints on renewable energy availability, allowing the optimization algorithm to function more efficiently by shifting consumption to less expensive periods and reducing reliance on more costly energy imports. For example, in the War scenario, which reflects geopolitical instability and its associated market disruptions, the optimization process resulted in a 26% reduction in electricity costs. Specifically, the net weekly costs before optimization were approximately 30.40 €, and they decreased to 22.54 € after the optimization was applied, that is, a weekly cost reduction of 7.86 €. This represents a significant saving for just one week and highlights the optimization model's ability to manage energy resources effectively, even under circumstances where external market forces might otherwise inflate costs. Similarly, in the BAU scenario, representing contemporary energy market conditions, a cost reduction of 29% was also observed. This consistency across different scenarios under the Stable case suggests that the algorithm has a robust capacity to optimize energy usage by redistributing energy consumption to less expensive periods, even when the external market forces are less extreme compared to the War scenario. In this case, costs decreased from 8.15 € before optimization to 5.79 € post-optimization. This reduction, while lower in absolute terms compared to the War scenario, is still significant, particularly considering that the BAU scenario operates within a more predictable market environment. The algorithm’s effectiveness in both the War and BAU scenarios indicates that the benefits of optimization are not confined to periods of market volatility, but also extend to more stable and regular market conditions.

However, while the results under Stable cases are notable, it is under Critical cases that the optimization process showcases its full potential. Critical cases simulate scenarios where renewable energy availability is severely constrained, often due to adverse weather patterns or other external pressures that limit the system's ability to rely on clean energy sources. In such situations, the reliance on imported electricity increases, and without optimization, the system would face significantly higher costs. Under these more challenging conditions, the optimization algorithm proved to be exceptionally effective, yielding even greater cost reductions than under the Stable case. Concerning, the COVID scenario, for instance, which represents a period marked by unprecedented global disruptions in energy demand and supply chains due to the pandemic, the optimization algorithm delivered a reduction of nearly 59% in peak period costs. Before optimization, peak period costs stood at 5.97 €, but after applying the optimization model, these costs dropped to 2.43 €. This reduction shows the model's capacity to adapt to highly constrained energy environments. Moreover, the Critical cases also presented a unique challenge in the War scenario, where renewable energy is less accessible, and electricity import costs are higher. In this scenario, the optimization algorithm reduced peak period costs by 52%, lowering them from 24.74 € to 11.78 €. This reduction, though slightly lower in percentage terms than the savings achieved in the COVID scenario, is still highly significant given the much higher baseline cost in the War scenario. Additionally, the OMIP 2030 scenario, which projects future energy pricing trends based on market forecasts, presents another interesting case for analysis. Under Critical cases in this scenario, a reduction of 49% was observed in peak period costs, with costs falling from 3.37 € to 1.73 €.

The analysis of energy imports is also important since it shows the model's ability to reduce the reliance on external electricity supplies across all the studied scenarios. First, under the Stable case, the optimization algorithm resulted in notable reductions in energy imports, in situations where renewable energy sources are readily available. In the War scenario, for instance, energy imports were reduced from 643.60 kWh to 477.65 kWh, representing a 26% decrease. Similarly, in the BAU scenario, the optimization model achieved a 27% reduction in energy imports under the Stable case, lowering imports to 469.66 kWh. Furthermore, the results from the COVID scenario also reveal interesting insights into the algorithm’s performance under the Stable case, where energy imports were reduced by 28%, to 465.46 kWh. Although the reductions are less pronounced compared to those observed under the Critical case, this still represents a significant improvement in energy mangegement.

However, the most compelling results were observed under the Critical case, where the availability of renewable energy is more restricted. In these scenarios, the optimization model demonstrated its true potential by significantly reducing energy imports during peak periods, where the cost and demand for electricity are at their highest. For example, in the COVID scenario, energy imports during peak periods were reduced by 59%, dropping from 817.73 kWh to 335.95 kWh. The results in the war scenario under the Critical case further validate the optimization algorithm's adaptability. Peak period imports were reduced by 53%, from 481.47 kWh to 224.83 kWh, a significant drop. It is also worth noting the results in the OMIP 2030 scenario, which projects future energy market conditions. Under the Critical case, the optimization model managed to reduce peak period imports by 50%, from 481.47 kWh to 241.85 kWh.

Beyond the raw cost reductions, it is important to recognize how the optimization algorithm shifts energy consumption patterns, especially in terms of reducing peak period costs and reallocating demand to less expensive times of day. For instance, across several scenarios, it was observed that while peak period costs decreased significantly, there was a slight increase in flat and valley period costs, as the optimization process redistributed energy demand. This reallocation is particularly important as it demonstrates the algorithm’s capability to smooth out energy consumption, preventing spikes during high-cost periods and spreading demand more evenly throughout the day.

Furthermore, the optimization model presented in this study also shows a reduction of CO2 emissions since it is directly linked to the energy imports reduction. In scenarios characterized by the Critical case, the optimization process was able to achieve reductions in emissions by redistributing energy use away from peak demand periods, helping to decrease the overall environmental footprint. In more Stable cases, for instance, in the BAU and OMIP 2030 scenarios, the optimization model continued to demonstrate its relevance. Although the availability of renewable energy was higher, leading to inherently lower baseline emissions, the optimization process still managed to deliver meaningful reductions in CO2 emissions.

Concerning the computational times for the optimization algorithm, significant variations were observed across scenarios, reflecting the complexity of energy management under different cases. In the Critical case, such as the War and BAU scenarios, computation times reached up to 60 minutes due to the need to manage limited renewable energy availability and fluctuating demand. Conversely, under Stable cases, computation times were considerably lower, typically around 23 minutes, as the optimization process benefited from more adaptative energy patterns.

Conclusion

This study presents an analysis of a genetic algorithm framework designed to optimize energy management in hybrid poly-generation systems, focusing on a significant week characterized by fluctuating energy prices influenced by global events. Simulations were conducted across four distinct scenarios: War, COVID, BAU, and OMIP 2030, reflecting a range of market conditions and price dynamics. The analysis was further contextualized by examining both Stable and Critical cases, the former with high resource availability and lower energy demand, and the latter with low energy availability and high energy demand. This procedure highlights the model's adaptability and effectiveness in diverse operational environments.

The results show substantial cost reductions in electricity management, particularly under the Critical case where renewable energy availability was limited. For instance, during the COVID scenario, the optimization algorithm achieved nearly a 59% reduction in costs during peak periods, showcasing its capability to manage energy resources effectively in times of crisis. Its ability to reduce energy imports by shifting consumption patterns away from peak periods and into valley periods contributes to a more sustainable, resilient energy system that is better equipped to handle fluctuations in energy supply and demand. Additionally, the model contributed to significant reductions in CO2 emissions, reinforcing the dual benefits of economic efficiency and environmental sustainability.

The computational performance of the algorithm varied across scenarios, indicating that while it effectively adapts to changing conditions, there remains an opportunity for refinement to enhance efficiency, particularly in constrained scenarios. Future research should aim to accelerate computational processes to enable real-time applications, thus maximizing the potential for timely cost and emissions reductions.

Therefore, the study provided valuable insights into the implementation of advanced optimization techniques in energy management systems. Addressing the complexities of modern energy markets through simulations in significant contexts contributes to the ongoing address on sustainable energy practices and highlights the importance of resilient energy infrastructures against volatility in the electricity market.

REFERENCES
  1. Eti S., “Assessment of technical and financial challenges for renewable energy project alternatives,”, Clean Eng Technol, 100719, https://doi.org/10.1016/j.clet.2023.100719
  2. Puksec T., Markovska N., Foley A., Duić N., “Addressing the transition to sustainable energy systems: Special issue dedicated to the 2018 conferences on Sustainable Development of Energy, Water and Environment Systems (SDEWES),”, Mar. 01, 2020, Elsevier Ltd., , https://doi.org/10.1016/j.rser.2019.109520
  3. Farsaei A., Olkkonen V., Kan X., Syri S., “Electricity Market Impacts of Low-carbon Energy Transition in the Nordic-Baltic Region,”, Journal of Sustainable Development of Energy, Water and Environment Systems, Vol. 10 (2), , https://doi.org/10.13044/j.sdewes.d9.0407
  4. Khalid M., “Smart grids and renewable energy systems: Perspectives and grid integration challenges,”, Jan. 01, 2024, Elsevier Ltd., , https://doi.org/10.1016/j.esr.2024.101299
  5. Dahane A., Sharma R., “Hybrid AC-DC microgrid coordinated control strategies: A systematic review and future prospect,”, Renewable Energy Focus, Vol. 49 , :100553, https://doi.org/10.1016/j.ref.2024.100553
  6. Fernandez Vazquez C., Vansighen T., Fernandez Fuentes M., Quoilin S., “Energy transition implications for Bolivia. Long-term modelling with short-term assessment of future scenarios,”, Renewable and Sustainable Energy Reviews, Vol. 189 , , https://doi.org/10.1016/j.rser.2023.113946
  7. Zhang W., Y., Calautit J., “A review on occupancy prediction through machine learning for enhancing energy efficiency, air quality and thermal comfort in the built environment,”, Renewable and Sustainable Energy Reviews, Vol. 167 , , https://doi.org/10.1016/j.rser.2022.112704
  8. Groppi D., Pfeifer A., Garcia D., Krajačić G., Duić N., “A review on energy storage and demand side management solutions in smart energy islands,”, Renewable and Sustainable Energy Reviews, Vol. 135 , , https://doi.org/10.1016/j.rser.2020.110183
  9. Azarpour A., Mohammadzadeh O., Rezaei N., Zendehboudi S., “Current status and future prospects of renewable and sustainable energy in North America: Progress and challenges,”, Oct. 01, 2022, Elsevier Ltd., , https://doi.org/10.1016/j.enconman.2022.115945
  10. Akpahou R., Odoi-Yorke F., Mensah L., Quansah D., Kemausuor F., “Strategizing towards sustainable energy planning: Modeling the mix of future generation technologies for 2050 in Benin,”, Renewable and Sustainable Energy Transition, Vol. 5 , , https://doi.org/10.1016/j.rset.2024.100079
  11. Peng G., Xiang Y., “CO2 emission coupled power generation mix evolution: A system dynamics approach,”, Energy Reports, Vol. 8 , :597-604, https://doi.org/10.1016/j.egyr.2022.05.225
  12. Kumi E., Mahama M., “Greenhouse gas (GHG) emissions reduction in the electricity sector: Implications of increasing renewable energy penetration in Ghana’s electricity generation mix,”, Sci Afr, Vol. 21 , , https://doi.org/10.1016/j.sciaf.2023.e01843
  13. Vargas-Salgado C., Berna-Escriche C., Escriva-Castells A., D^az-Bello D., “Optimization of All-Renewable Generation Mix According to Different Demand Response Scenarios to Cover All the Electricity Demand Forecast by 2040: The Case of the Grand Canary Island,”, Sustainability (Switzerland), Vol. 14 (3), , https://doi.org/10.3390/su14031738
  14. Mathiesen B., “Smart Energy Systems for coherent 100% renewable energy and transport solutions,”, May 01, 2015, Elsevier Ltd., , https://doi.org/10.1016/j.apenergy.2015.01.075
  15. Bataineh K., Al Rabee A., “Design Optimization of Energy Efficient Residential Buildings in Mediterranean Region,”, Journal of Sustainable Development of Energy, Water and Environment Systems, Vol. 10 (2), , https://doi.org/10.13044/j.sdewes.d9.0385
  16. Heydari A., Majidi Nezhad M., Pirshayan E., Astiaso Garcia D., Keynia F., De Santoli L., “Short-term electricity price and load forecasting in isolated power grids based on composite neural network and gravitational search optimization algorithm,”, Appl Energy, Vol. 277 , , https://doi.org/10.1016/j.apenergy.2020.115503
  17. Neshat M., “Wind turbine power output prediction using a new hybrid neuro-evolutionary method,”, Energy, Vol. 229 , , https://doi.org/10.1016/j.energy.2021.120617
  18. Garona H., Cavalcanti F., de Abreu T., Schmal M., Alves R., “Evaluation of Fischer-Tropsch synthesis to light olefins over Co- and Fe-based catalysts using artificial neural network,”, J Clean Prod, Vol. 321 , , https://doi.org/10.1016/j.jclepro.2021.129003
  19. Aguila-Leon J., Vargas-Salgado C., Chinas-Palacios C., D^az-Bello D., “Solar photovoltaic Maximum Power Point Tracking controller optimization using Grey Wolf Optimizer: A performance comparison between bio-inspired and traditional algorithms,”, Expert Syst Appl, Vol. 211 , , https://doi.org/10.1016/j.eswa.2022.118700
  20. Camas-Nafate M., Coronado-Mendoza A., Vargas-Salgado C., Aguila-Leon J., Alfonso-Solar D., “Optimizing Lithium-Ion Battery Modeling: A Comparative Analysis of PSO and GWO Algorithms,”, Energies (Basel), Vol. 17 (4), :822, https://doi.org/10.3390/en17040822
  21. Aguila-Leon J., Chinas-Palacios C., Vargas-Salgado C., Hurtado-Perez E., Garcia E., “Particle swarm optimization, genetic Algorithm and grey Wolf optimizer algorithms performance comparative for a DC-DC boost converter PID controller,”, Advances in Science, Technology and Engineering Systems, Vol. 6 (1), :619-6252021, https://doi.org/10.25046/aj060167
  22. Karameros A., Chassiakos A., Karatzas S., “Design and Evaluation of a MicroGrid Energy Management Scheme Focusing on the Integration of Electric Vehicles,”, Journal of Sustainable Development of Energy, Water and Environment Systems, Vol. 11 (1), , https://doi.org/10.13044/j.sdewes.d9.0413
  23. Beucker S., Hinterholzer S., “Building Energy Management Systems and Their Role in the Energy Transition Results from Research Projects and Applications in Germany.”,
  24. Aguila-Leon J., Vargas-Salgado C., Chinas-Palacios C., D^az-Bello D., “Energy management model for a standalone hybrid microgrid through a particle Swarm optimization and artificial neural networks approach,”, Energy Convers Manag, Vol. 267 , , https://doi.org/10.1016/j.enconman.2022.115920
  25. Chinas-Palacios C., Vargas-Salgado C., Aguila-Leon J., Hurtado-Perez E., “A cascade hybrid PSO feed-forward neural network model of a biomass gasification plant for covering the energy demand in an AC microgrid,”, Energy ConversManag, Vol. 232 , , https://doi.org/10.1016/j.enconman.2021.113896
  26. Sandgani M., Sirouspour S., “Priority-Based Microgrid Energy Management in a Network Environment,”, IEEE Trans Sustain Energy, Vol. 9 (2), :980-990, https://doi.org/10.1109/TSTE.2017.2769558
  27. Aguila-Leon J., Chinas-Palacios C., Garcia E., Vargas-Salgado C., “A multimicrogrid energy management model implementing an evolutionary game-theoretic approach,”, International Transactions on Electrical Energy Systems, Vol. 30 (11), , https://doi.org/10.1002/2050-7038.12617
  28. Martins H., Henriques C., Figueira J., Silva C., Costa A., “Assessing policy interventions to stimulate the transition of electric vehicle technology in the European Union,”, Socioecon Plann Sci, Vol. 87 , , https://doi.org/10.1016/j.seps.2022.101505
  29. Kawanami F., Tabata T., “Model Analysis of the Impact of Increased Time at Home on Household Energy Consumption: A Japanese Case Study during the COVID-19 Lockdown,”, J. sustain. dev. energy water environ. syst, Vol. 11 (1), :10804122023, https://doi.org/10.13044/j.sdewes.d8.0412
  30. Du G., Cao W., Hu S., Lin Z., Yuan T., “Design and Assessment of an Electric Vehicle Powertrain Model Based on Real-World Driving and Charging Cycles,”, IEEE Trans Veh Technol, Vol. 68 (2), :1178-1187, https://doi.org/10.1109/TVT.2018.2884812
  31. , “Nissan delivers 300,000th Nissan LEAF.”
  32. , “Analysis | ESIOS electricity • data • transparency.”,
  33. , “OMIP.”,
  34. , “REData - Non renewable detail CO2 emissions | Red Elĕctrica.”,

DBG